package com.cafe.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.ManyToAny;

import com.malamute.core.entity.BaseEntity;

/**
 * @Description 会员实体
 * @version v1.0
 */

@Entity
@Table(name = "T_CAFE_CUSTOMER")
public class Customer extends BaseEntity {

	/**
	 * serialVersionUID:TODO（用一句话描述这个变量表示什么）
	 */
	private static final long serialVersionUID = 1L;

	private String name;// 姓名

	// private Integer age;// 年龄

	private Date birthday;// 出生年月

	private String username;// 登录名

	private String password;// 密码

	private String email;// 邮件地址

	private String address;// 地址

	private String mobilePhone;// 移动电话

	@Enumerated(value = EnumType.ORDINAL)
	private Gender gender = Gender.MAN;// 性别

	private String idCard;// 证件号

	@OneToMany(targetEntity = Order.class, mappedBy = "customer")
	private List<Order> orderList;// 订单组

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	/**
	 * 获取name
	 * 
	 * @return name
	 */

	public String getName() {
		return name;
	}

	/**
	 * 设置name
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取username
	 * 
	 * @return username
	 */

	public String getUsername() {
		return username;
	}

	/**
	 * 设置username
	 * 
	 * @param username
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * 获取password
	 * 
	 * @return password
	 */

	public String getPassword() {
		return password;
	}

	/**
	 * 设置password
	 * 
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 获取email
	 * 
	 * @return email
	 */

	public String getEmail() {
		return email;
	}

	/**
	 * 设置email
	 * 
	 * @param email
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * 获取address
	 * 
	 * @return address
	 */

	public String getAddress() {
		return address;
	}

	/**
	 * 设置address
	 * 
	 * @param address
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * 获取gender
	 * 
	 * @return gender
	 */

	public Gender getGender() {
		return gender;
	}

	/**
	 * 设置gender
	 * 
	 * @param gender
	 */
	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	/**
	 * 获取mobilePhone
	 * 
	 * @return mobilePhone
	 */

	public String getMobilePhone() {
		return mobilePhone;
	}

	/**
	 * 设置mobilePhone
	 * 
	 * @param mobilePhone
	 */
	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public List<Order> getOrderList() {
		return orderList;
	}

	public void setOrderList(List<Order> orderList) {
		this.orderList = orderList;
	}

}
